var hash = require('object-hash');
const peter = 123456

var a = hash(peter, { algorithm: 'md5', encoding: 'base64' });
console.log(a);